package com.ibeeking.found.common.enums;

public enum EmployeeStatusEnum {
    IS_ACTIVED(1, "已激活"),
    IS_FORBIDDEN(2, "已禁用"),
    NO_ACTIVED(4, "未激活"),
    IS_QUIT(5, "退出企业");

    private Integer code;
    private String desc;

    EmployeeStatusEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDescByCode(Integer code) {
        for (EmployeeStatusEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj.getDesc();
            }
        }
        return null;
    }
}
